package com.cz.ssyx.activity.mapper;

import com.cz.ssyx.model.activity.ActivityInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cz.ssyx.model.activity.ActivityRule;
import com.cz.ssyx.model.activity.ActivitySku;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 活动表 Mapper 接口
 * </p>
 *
 * @author Joker
 * @since 2024-04-20
 */
@Mapper
public interface ActivityInfoMapper extends BaseMapper<ActivityInfo> {

    //编写sql语句，筛选出正在参加活动的商品
    List<Long> selectSkuIdListExist(@Param("skuIdList") List<Long> skuIdList);

    //通过skuId查询出商品的活动信息
    List<ActivityRule> findActivityRule(@Param("skuId") Long skuId);

    //根据skuId查activity_sku
    List<ActivitySku> selectCartActivity(@Param("skuIdList") List<Long> skuIdList);
}
